package com.jiangjiang.eshop.commodity.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @ClassName CategoryEntity
 * @Description TODO
 * @Author jhw
 * @Date 2021/6/20 14:43
 * @Version 1.0
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("commodity_category")
public class CategoryEntity {
    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 类目名称
     */
    @TableField("name")
    private String name;
    /**
     * 类目描述
     */
    @TableField("description")
    private String description;
    /**
     * 父级类目id
     */
    @TableField("parent_id")
    private Long parentId;
    /**
     * 是否是叶子类目 1-是 0-否
     */
    @TableField("is_leaf")
    private Integer isLeaf;
    /**
     * 类目创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    private Date gmtCreate;
    /**
     * 类目的更新时间
     */
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

}
